$OpenBSD: patch-clients_Makefile_in,v 1.20 2015/04/23 22:38:55 sthen Exp $
--- clients/Makefile.in.orig	Wed Apr 22 09:38:04 2015
+++ clients/Makefile.in	Thu Apr 23 15:05:19 2015
@@ -519,10 +519,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
 upssched_SOURCES = upssched.c upssched.h
 upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
 upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
-upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
+upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) -all-static
 upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
+upsset_cgi_LDADD = $(LDADD) -all-static
 upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h	\
  upsimagearg.h cgilib.c cgilib.h
+upsstats_cgi_LDADD = $(LDADD) -all-static
 
 
 # not LDADD.
